<?php $headPhoto = ($album->HeadPhoto == null) ? 
                               (($album->Photos[0] == null) ? 'themes/'.$theme.'/images/no-image.png' : $album->Photos[0]->ThumbnailUNC)
                                                  : $album->HeadPhoto->ThumbnailUnc; ?>
<div class="item_album">
    <div class="folder">
      <a class="<?php echo $album->ProtectionName;?>" href="<?php echo WebRoot;?>album.php?idAlbum=<?php echo $album->idAlbum;?>">
        <img src="<?php echo WebRoot.$headPhoto; ?>" alt="<?php echo $album->Name; ?>" />
        <span><?php echo $album->Name; ?></span>        
      </a>
    </div>    
</div>

<div class="tooltip-album">
  
  <div class="tooltip-album-head">
    <strong><?php echo $album->Name; ?></strong>
    <?php printf(T_ngettext("(%d Photo)", "(%d Photos)", $album->PhotoCount), $album->PhotoCount); ?>
  </div>
  
  <div class="tooltip-album-desc">
    <?php echo ($album->Description != null) ? $album->Description : T_('- no description -');?>
  </div>  
  
  <div class="tooltip-album-info">
    <strong><?php echo T_("Created: ")?></strong>
      <?php echo $album->CreationDate->format($dateFormat);?><br />
    <strong><?php echo T_("Modified: ")?></strong>
      <?php echo $album->ModifyDate->format($dateFormat);?><br />
    <strong><?php echo T_("Owner: ");?> </strong>
      <a href="<?php echo WebRoot;?>profile.php?id=<?php echo $album->User->idUser;?>">
        <?php echo $album->User->UserName;?>
      </a><br />
    <strong><?php echo T_("Protection: ");?></strong>
      <span title="<?php echo T_($album->Protection->Description) ?>"><?php echo $album->ProtectionName; ?></span>
  </div>
 
  <?php if($album->User == $user) { ?>
   <div class="tooltip-album-edit">
    <a href="<?php echo WebRoot; ?>editAlbum.php?album=<?php echo $album->idAlbum;?>"><?php echo T_("edit"); ?></a><br />
    <a href="<?php echo WebRoot; ?>controllers/deleteAlbum.php?album=<?php echo $album->idAlbum;?>"><?php echo T_("delete"); ?></a>
   </div>
  <?php } ?>
  <div class="tooltip-album-bottom"></div> 
 </div>